<header>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <!-- 导航头部 -->
            <div class="navbar-header">
                <!-- 移动设备上的导航切换按钮 -->
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-example">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <!-- 品牌名称或logo -->
                <a class="navbar-brand" href="{:url('Home/index/index')}">{:config('WEB_SITE_TITLE')}</a>
            </div>
            <!-- 导航项目 -->
            <div class="collapse navbar-collapse navbar-collapse-example">
                <!-- 一般导航项目 -->
                <ul class="nav navbar-nav">



				<cms:nav name="nav" tree="true">
					<eq name="nav.parentid" value="0">
                        <if condition="isset($nav['sub']) && $nav['sub']">
						<li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="icon icon-{$nav.icon}"></i>
                                {$nav.name}
                                <b class="caret"></b>
                            </a>
                        <else />
                        <li>
							<a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>">
                                <i class="icon icon-{$nav.icon}"></i>
                                {$nav.name}
							</a>
                        </if>
							<if condition="isset($nav['sub']) && $nav['sub']">
							<ul class="dropdown-menu" role="menu">
								<volist name="nav['sub']" id="sub">
                                    <if condition="isset($sub['sub']) && $sub['sub']">
                                        <li class="dropdown-submenu">
                                            <a href="#">{$sub.name}</a>
											<ul class="dropdown-menu">
											<volist name="sub['sub']" id="thr">
												<li>
													<a href="{$thr.url|get_nav_url}">{$thr.name}</a>
												</li>
											</volist>
											</ul>
                                    <else/>
                                    <li><a href="{$sub.url|get_nav_url}">{$sub.name}</a>
                                    </if>
									</li>
								</volist>
							</ul>
							</if>
						</li>
					</eq>
				</cms:nav>

                </ul>
                <!-- 右侧的导航项目 -->
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon icon-user"></i>用户中心 <b class="caret"></b></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">敏捷开发</a></li>
                            <li><a href="#">HTML5</a></li>
                            <li><a href="#">Javascript</a></li>
                            <li class="divider"></li>
                            <li><a href="#">探索宇宙</a></li>
                        </ul>
                    </li>
                </ul>
            </div><!-- END .navbar-collapse -->
        </div>
    </nav>
</header>
